//
//  SLNewAttentionCollectionViewCell.m
//  StarLight
//
//  Created by apple on 16/7/30.
//  Copyright © 2016年 Duke.Wu. All rights reserved.
//

#import "SLNewAttentionCollectionViewCell.h"


@interface SLNewAttentionCollectionViewCell ()

@property (nonatomic ,strong) UILabel *AttentionTitle;

@property (nonatomic ,strong) UILabel *AttentionNum;

@property (nonatomic ,strong) UIView *marginLine;

@end


@implementation SLNewAttentionCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self addUI];
    }
    return self;
}

- (void)cellForTitle:(NSString *)titleName num:(NSString *)num
{
    self.AttentionTitle.text = titleName;
    self.AttentionNum.text = num;
}

- (void)addUI{
    [self addSubview:self.AttentionTitle];
    [self addSubview:self.AttentionNum];
    [self addSubview:self.marginLine];
    
    
    [self.AttentionTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).with.offset(14);
        make.centerX.equalTo(self);
        make.height.mas_equalTo(16);
    }];
    
    [self.AttentionNum mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.AttentionTitle.mas_bottom).with.offset(10);
        make.height.mas_equalTo(17);
    }];
    
    [self.marginLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_right);
        make.width.mas_equalTo(0.4);
        make.height.equalTo(self);
        make.centerY.equalTo(self);
    }];
}

- (UILabel *)AttentionTitle
{
    if (!_AttentionTitle) {
        _AttentionTitle = [UILabel new];
        _AttentionTitle.text = @"关注我的";
        _AttentionTitle.font = bFont(16);
    }
    return _AttentionTitle;
}

- (UILabel *)AttentionNum
{
    if (!_AttentionNum) {
        _AttentionNum = [UILabel new];
        _AttentionNum.text = @"38";
        _AttentionNum.textColor = RGBCOLOR(153, 153, 153);
        _AttentionNum.font = bFont(17);
    }
    return _AttentionNum;
}

- (UIView *)marginLine
{
    if (!_marginLine) {
        _marginLine = [UIView new];
        _marginLine.backgroundColor = RGBCOLOR(214, 214, 214);
    }
    return _marginLine;
}

@end
